const store = {
  state: {
    sarr: [10, 20, 30],
  },
  actions: {
    sarrpush(
      newState: { sarr: number[] },
      action: { type: string; value: number }
    ) {
      newState.sarr.push(action.value);
    },
  },
  // 1 
  // sarrpush: "sarrpush",
  // 2 名字同一管理
  actionNames: {},
};
let actionNames = {};

for (let key in store.actions) {
  actionNames[key] = key;
}
store.actionNames = actionNames;

export default store;
